﻿using Grain.State.StateEntitys;
using iTool.ClusterComponent;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Grain.Interfaces
{
    /// <summary>
    /// 函数列表编辑状态
    /// </summary>
    public interface IEditCloudFunctionListService : iToolService
    {
        /// <summary>
        /// 获取函数列表
        /// </summary>
        /// <returns></returns>
        Task<List<EditCloudFunctionListState>> GetFilesDetail();

        /// <summary>
        /// 进入编辑状态
        /// </summary>
        Task EnterEditState(string modulePath, string channel);

        /// <summary>
        /// 退出编辑状态
        /// </summary>
        Task ExitEditState(string modulePath);

        /// <summary>
        /// 添加临时文件
        /// </summary>
        Task AddTemporaryFunction(bool isUseState, string modulePath, string channel);

        /// <summary>
        /// 删除文件
        /// </summary>
        Task RemoveFunction(string modulePath);
    }
}
